package web.eshop;

import org.apache.wicket.Component;
import org.apache.wicket.PageParameters;
import web.BasePage;
import web.eshop.panels.LadderPanel;
import web.panels.TopMenuPanel;

public abstract class ShopBasePage extends BasePage {


    @Override
    protected Component newTopPanel(String id) {
        return new TopMenuPanel("top");
    }

    public ShopBasePage() {
        super();
//        setSecurityCheck(new ComponentSecurityCheck(this));
        // Note this check does not handle the right to instantiate this class,
        // we are to
        // late for that, please check your implementation for how that is
        // handled.

    }

    public ShopBasePage(PageParameters params) {
//        super(parameters);
//		setSecurityCheck(new ComponentSecurityCheck(this));
//		// Note this check does not handle the right to instantiate this class,
//		// we are to
//		// late for that, please check your implementation for how that is
//		// handled.
//        //
        this();
    }


    @Override
    protected Component newRightPanel(String id) {
        return new LadderPanel(id);
    }

//    /**
//     * @see org.apache.wicket.security.components.ISecureComponent#setSecurityCheck(org.apache.wicket.security.checks.ISecurityCheck)
//     */
//    public final void setSecurityCheck(ISecurityCheck check) {
//        SecureComponentHelper.setSecurityCheck(this, check);
//
//    }
//
//    /**
//     * @see org.apache.wicket.security.components.ISecureComponent#getSecurityCheck()
//     */
//    public final ISecurityCheck getSecurityCheck() {
//        return SecureComponentHelper.getSecurityCheck(this);
//    }
//
//    /**
//     * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(java.lang.String)
//     */
//    public boolean isActionAuthorized(String action) {
//        return SecureComponentHelper.isActionAuthorized(this, action);
//    }
//
//    /**
//     * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(org.apache.wicket.security.actions.WaspAction)
//     */
//    public boolean isActionAuthorized(WaspAction action) {
//        return SecureComponentHelper.isActionAuthorized(this, action);
//    }
//
//    /**
//     * @see org.apache.wicket.security.components.ISecureComponent#isAuthenticated()
//     */
//    public boolean isAuthenticated() {
//        return SecureComponentHelper.isAuthenticated(this);
//    }
}

